home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 17134 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.9 KB

  1. Path: prairienet.org!wemccaug
  2. From: wemccaug@prairienet.org (Wendy E. McCaughrin)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: HELP: no mapping at the fault address
  5. Date: 14 Apr 1996 00:34:28 GMT
  6. Organization: University of Illinois at Urbana
  7. Message-ID: <4kph6k$4s0@vixen.cso.uiuc.edu>
  8. References: <828829661snz@genesis.demon.co.uk> <opybocswab.fsf@sweetbay.will.uiuc.edu> <4k3qn8$1gk6@msunews.cl.msu.edu>
  9. Reply-To: wemccaug@prairienet.org (Wendy E. McCaughrin)
  10. NNTP-Posting-Host: firefly.prairienet.org
  11.  
  12.  
  13. In a previous article, fred@genesis.demon.co.uk (Lawrence Kirby) says:
  14.  
  15. >In article <4k3qn8$1gk6@msunews.cl.msu.edu>
  16. >           jliu@perm.fw.msu.edu "Jianguo Liu" writes:
  17. >
  18. >>Hello, everyone:
  19. >>
  20. >>I had an error when running a program in SPARCcompiler C++ 
  21. >>4.0.1 (Solaris 2.4). The error was deteced using dbx. The 
  22. >>message was
  23. >>
  24. >>**********************************
  25. >>
  26. >>signal SEGV (no mapping at the fault address) in t-splay at 
  27. >>0xef6bc470. 
  28. >>
  29. >>The current line is 
  30. >>
  31. >>new_ptr=(strucut tree *) malloc(sizeof(struct tree));
  32. >
  33. >Did you include stdlib.h? You must ensure that all functions that don't
  34. >return int or are variadic are declared (it is best that all functions are
  35. >declared). If that isn't the problem your program probably corrupted the
  36. >heap earlier by some illegal pointer operation such as writing outside
  37. >array bounds, using undefined pointers, or passing illegal pointers to free
  38. >(i.e. pointers to objects not allocated from the heap or already freed).
  39. >
  40. >You should also be a little more clear whether you are using C or C++.
  41.  
  42.  Since C++ is supposed to be a superset of C and only C constructs
  43.  are in use here, the need for clarification is debatable.
  44.  
  45.  Since no user-defined function calls are made in this line, the
  46.  need to include stdlib.h is also debatable (as a cause for alarm)
  47.  here, though its use isin general well-advised.
  48.  
  49.  But what about the most obvious cause: OUT OF MEMORY?
  50.